define(function(require, exports, module) {
    return {
        set: function(key, data) {
            return localStorage.setItem(key, window.JSON.stringify(data));
        },
        get: function(key) {
            return eval('(' + localStorage.getItem(key) + ')');
        },
        remove: function(key) {
            return localStorage.removeItem(key);
        },
        clear: function() {
            return localStorage.clear(key);
        }
    }
});